<template>
    <div>
        <router-link tag="div" :to="'/detail/'+item.id" 
            class="recommend" v-for="(item) of recommendList" :key="item.id">
                <div>
                    <img :src="item.imgUrl" alt>
                </div>
                <div class="recommend-2">
                    <p class="title">{{item.title}}</p>
                    <p class="title-2">{{item.content}}</p>
                    <button class="see">查看详情</button>
                </div>
        </router-link>
    </div>
</template>
<script>
export default {
    name:"HomeHot",
    props:{
        recommendList:{
            type:Array
        }
    }
}
</script>
<style lang="scss" scoped>
.recommend{
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #eee;
    img{
        width:150px;
        height: 150px;
    }
}
.recommend-2{
    display: flex;
    flex-direction: column;
    padding: 0 0 0 20px;
}
.title{
    font-size: 34px;
    font-weight: 700;
}
.title-2{
    color: #999;
}
.see{
    margin-top: 10px;
    color: salmon;
    background-color: #eee;
    width: 200px;
    height: 60px;
    border-radius: 15px;
    border: 1px solid #ddd;
}
.line{
    border: 3px solid #eee;
}
</style>
